package com.greenline.push.core.enums;

/**
 * ClassMessageStatus message推送状态
 * 
 * @author shuai.zuo
 * 
 */
public enum ClassMessageStatus {

    WAIT_PUSH(0, "待推送"), PUSHED(1, "已推送");
    private int status;
    private String desc;

    public static ClassMessageStatus getMessageStatus(Integer status) {
        for (ClassMessageStatus msgStatus : ClassMessageStatus.values()) {
            if (msgStatus.getStatus() == status) {
                return msgStatus;
            }
        }
        return null;
    }

    /**
     * @param status
     * @param desc
     */
    private ClassMessageStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

}
